package entity;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement(namespace="http://jw.nju.edu.cn/schema",name="学生")
@XmlType(propOrder={"personInfo","joinTime","sid","grades","gpa"})
public class Student{

	private PersonInfo personInfo;
	private String joinTime;
	private String sid;
	private List<CourseScore> grades;
	private double gpa;
	
	public Student(){
		super();
	}
	
	public Student(PersonInfo personInfo, String joinTime, String sid, List<CourseScore> grades, double gpa) {
		super();
		this.personInfo = personInfo;
		this.joinTime = joinTime;
		this.sid = sid;
		this.grades = grades;
		this.gpa = gpa;
	}
	
	@XmlElement(namespace="http://jw.nju.edu.cn/schema",name="个人信息")
	public PersonInfo getPersonInfo() {
		return personInfo;
	}
	@XmlElement(namespace="http://jw.nju.edu.cn/schema",name="入学时间")
	public String getJoinTime() {
		return joinTime;
	}
	@XmlElement(namespace="http://jw.nju.edu.cn/schema",name="学号")
	public String getSid() {
		return sid;
	}
	@XmlElementWrapper(namespace="http://jw.nju.edu.cn/schema",name="成绩列表")
	@XmlElement(namespace="http://jw.nju.edu.cn/schema",name="课程成绩")
	public List<CourseScore> getGrades() {
		return grades;
	}
	@XmlElement(namespace="http://jw.nju.edu.cn/schema",name="绩点")
	public double getGpa() {
		return gpa;
	}
	public void setPersonInfo(PersonInfo personInfo) {
		this.personInfo = personInfo;
	}
	public void setJoinTime(String joinTime) {
		this.joinTime = joinTime;
	}
	public void setSid(String sid) {
		this.sid = sid;
	}
	public void setGrades(List<CourseScore> grades) {
		this.grades = grades;
	}
	public void setGpa(double gpa) {
		this.gpa = gpa;
	}
}
